Interface sjl.ForwardIterator
All Packages Class Hierarchy This Package Previous Next Index
Interface sjl.ForwardIterator
- public interface ForwardIterator
- extends Object
- extends InputIterator, OutputIterator
Defines the methods allowed on forward iterators. A forward iterator allow
multiple passes over the container.
Copyright © 1996 Finn Bock
-
distance(Iterator)
- Return the number of times this must be advanced (with next()) in
order to reach target.
-
setTo(Iterator)
- Set the position of this iterator to the same position as
another iterator.
distance
public abstract int distance(Iterator target)
- Return the number of times this must be advanced (with next()) in
order to reach target. It is required that both this and target
must point to the same container.
- Parameters:
- target - the destination iterator.
setTo
public abstract void setTo(Iterator i)
- Set the position of this iterator to the same position as
another iterator. The two iterator must be same, or a casting
error occurs.
All Packages Class Hierarchy This Package Previous Next Index